using System;
using System.Data.Entity.ModelConfiguration;
using System.Data.Common;
using System.Data.Entity;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using DomainLayer.Data.Entities;

namespace Infrastructure.Data.Mapping
{
	public class AbnormWaybillMap : EntityTypeConfiguration<AbnormWaybill>
	{
		public AbnormWaybillMap()
		{
			// Primary Key
			this.HasKey(t => t.AbnormWaybillID);

			// Properties
			this.Property(t => t.Reason)
				.HasMaxLength(20);
				
			this.Property(t => t.Remark)
				.HasMaxLength(200);
				
			this.Property(t => t.Description)
				.HasMaxLength(200);
				
			this.Property(t => t.AbnormStatus)
				.HasMaxLength(20);
				
			this.Property(t => t.DealStatus)
				.HasMaxLength(20);
				
			this.Property(t => t.StationReplyContent)
				.HasMaxLength(200);
				
			// Table & Column Mappings
			this.ToTable("AbnormWaybill");
			this.Property(t => t.AbnormWaybillID).HasColumnName("AbnormWaybillID");
			this.Property(t => t.WaybillNO).HasColumnName("WaybillNO");
			this.Property(t => t.CreateTime).HasColumnName("CreateTime");
			this.Property(t => t.Reason).HasColumnName("Reason");
			this.Property(t => t.Remark).HasColumnName("Remark");
			this.Property(t => t.Description).HasColumnName("Description");
			this.Property(t => t.AbnormStatus).HasColumnName("AbnormStatus");
			this.Property(t => t.DealStatus).HasColumnName("DealStatus");
			this.Property(t => t.StationReplyContent).HasColumnName("StationReplyContent");
			this.Property(t => t.StationReplyTime).HasColumnName("StationReplyTime");
			this.Property(t => t.UpdateBy).HasColumnName("UpdateBy");
			this.Property(t => t.UpdateStation).HasColumnName("UpdateStation");
			this.Property(t => t.UpdateTime).HasColumnName("UpdateTime");
			this.Property(t => t.IsDelete).HasColumnName("IsDelete");
			this.Property(t => t.IsSynVancl).HasColumnName("IsSynVancl");
			this.Property(t => t.IsSynOk).HasColumnName("IsSynOk");
		}
	}
}

